package com.yiwei.jmx.activity;

import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.ImageView;

import com.yiwei.jmx.R;
import com.yiwei.jmx.adapter.IdentityOneAdapter;
import com.yiwei.jmx.adapter.IdentityTwoAdapter;
import com.yiwei.jmx.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * Created by xsooy-pc on 17-12-8.
 */

public class IdentityCenterActivity extends BaseActivity {


    @BindView(R.id.btn_back)
    ImageView btnBack;
    @BindView(R.id.btn_notice)
    ImageView btnNotice;
    @BindView(R.id.btn_wechat)
    ImageView btnWechat;
    @BindView(R.id.list_one)
    RecyclerView listOne;
    @BindView(R.id.list_two)
    RecyclerView listTwo;
    private Unbinder unbiner;
    private IdentityOneAdapter identityOneAdapter;
    private IdentityTwoAdapter identityTwoAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_identity_center);
        initBar();
        unbiner = ButterKnife.bind(this);
        init();
    }

    private void init() {
        identityOneAdapter = new IdentityOneAdapter(this);
        listOne.setLayoutManager(new GridLayoutManager(this,3));
        listOne.setAdapter(identityOneAdapter);

        identityTwoAdapter = new IdentityTwoAdapter(this);
        listTwo.setLayoutManager(new GridLayoutManager(this,3));
        listTwo.setAdapter(identityTwoAdapter);

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unbiner.unbind();
        unbiner = null;
    }
}
